home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / portable / box.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-29  |  1.5 KB  |  52 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    box
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_box = "$Header: C:\CURSES\portable\RCS\box.c 2.1 1993/06/18 20:19:37 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   box()    - draw box
  15.  
  16.   X/Open Description:    
  17.      A box is drawn around the edge of the window.  The characters
  18.      vert and hor are the characters used to draw the box.  If vert or
  19.      hor are zero, then appropriate default characters will be used.
  20.  
  21.   PDCurses Description:
  22.      See border() for additional control over the sides and corners
  23.      of the box drawn.
  24.  
  25.   X/Open Return Value:
  26.      The box() function returns OK on success and ERR on error.
  27.  
  28.   PDCurses Errors:
  29.      No errors are defined for these functions.
  30.  
  31.   Portability:
  32.      PDCurses    int box( WINDOW* win, chtype vert, chtype hor );
  33.      X/Open Dec '88    int box( WINDOW* win, chtype vert, chtype hor );
  34.      BSD Curses    int box( WINDOW* win, chtype vert, chtype hor );
  35.      SYS V Curses    int box( WINDOW* win, chtype vert, chtype hor );
  36.  
  37. **man-end**********************************************************************/
  38.  
  39. int    box( WINDOW *win, chtype vert, chtype hor )
  40. {
  41. #ifdef PDCDEBUG
  42.     if (trace_on) PDC_debug("box() - called\n");
  43. #endif
  44.  
  45.     if  (!vert || !hor)
  46.     {            /* SYSV Fix Courtesy of Augustine Cano */
  47.         vert= ACS_VLINE;/* afc@shibaya.lonestar.org */
  48.         hor = ACS_HLINE;/* 19920520           */
  49.     }
  50.     return( wbox( win, 0, 0, 0, 0, vert, hor ) );
  51. }
  52.